//
//  YLOrderIntroduceCell.m
//  YLFinanceService
//
//  Created by she1323 on 2017/9/7.
//  Copyright © 2017年 she1323. All rights reserved.
//

#import "YLOrderIntroduceCell.h"
#import "UIView+Extension.h"
#import "YLGlobeHeader.h"
@interface YLOrderIntroduceCell ()
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

@end

@implementation YLOrderIntroduceCell

- (void)awakeFromNib {
    [super awakeFromNib];
    _titleLabel.text = @"兑换商品将在下单后的第二个工作日寄出。请确保收货地址和电话的准确性。以免影响收货日期, 谢谢！";
    
    // Initialization code
    
}

+ (NSString *)cellID
{
    return @"YLOrderIntroduceCell";
}

+ (CGFloat)cellHeight
{
    NSString *str = @"兑换商品将在下单后的第二个工作日寄出。请确保收货地址和电话的准确性。以免影响收货日期, 谢谢！";
    NSMutableAttributedString *attributeString = [[NSMutableAttributedString alloc] initWithString:str];
    NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
    style.lineSpacing = 10;
    UIFont *font = [UIFont systemFontOfSize:13];
    [attributeString addAttribute:NSParagraphStyleAttributeName value:style range:NSMakeRange(0, str.length)];
    [attributeString addAttribute:NSFontAttributeName value:font range:NSMakeRange(0, str.length)];
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, YLScreenW - 30, 1)];
    label.font = [UIFont systemFontOfSize:14];
    label.numberOfLines = 0;
    label.attributedText = attributeString;
    CGSize size = [label sizeThatFits:CGSizeMake(label.frame.size.width, CGFLOAT_MAX)];

    return size.height + 10;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
